﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JXC.Core.Models
{
    /// <summary>
    /// 采购应付款文件
    /// </summary>
    public class CaigouDuepay
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        //应付款单号
        public Guid Id { get; set; }
        //付款日期
        public string PayTime { get; set; }
        //发生日期
        public DateTime HappenDate { get; set; }

        //供应商
        [ForeignKey("SupplierId")]
        public Guid SupplierId { get; set; }
        //货币
        public string Monerary { get; set; }
        //应付金额
        public decimal DueMoney { get; set; }
        //已付金额
        public decimal PaidMoney { get; set; }
        //余额
        public decimal RemainMoney { get; set; }
        //采购purchase/退货salesreturn
        public int BuyORerturn { get; set; }
        //操作员
        [ForeignKey("UserInfosId")]
        public Guid OperarorID { get; set; }
        //审核人
        [ForeignKey("UserInfosId")]
        public Guid? ExaminerID { get; set; }
        //备注
        public string? Others { get; set; }
        //核销状态/是否核销
        public int Chargeoff { get; set; }//Yes=1, No = 2

        public UserInfos Operaror { get; set; }
        public UserInfos Examiner { get; set; }
       
        public Supplier Supplier { get; set; }

    }
}
